﻿@using Lavka.Core
@using Lavka.Models
@model Lavka.Models.Products
           
<script type="text/javascript">
    $(".article").corner();
</script>
           
@if (Model.Articles.Count > 0)
{
    <div class="articles">
        <h2>Статьи по теме</h2>
        
        @foreach (Articles art in Model.Articles)
        {
            <div class="article">
            @if (!string.IsNullOrEmpty(@art.Photo))
            {
            <img src="@Url.Content(@art.Photo)" alt="@art.Title" class="float-image small-image"/>
            }
            else
            {
                <img src="@Url.Content("~/Content/images/article-default-image.png")" alt="@art.Title" class="float-image small-image"/>
                
            }
            <div class="header">@Html.ActionLink(art.Title, "Details", "Articles", new { id = art.ArticleId }, null)</div>
            <div style="text-align: justify;">@TextHelper.GetShortTextPreview(art.Body)</div>
            </div>
        }
    </div>
}